-
Notifications
You must be signed in to change notification settings - Fork 2
ci: enable jepsen tests by default #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| runs-on: ubuntu-latest | ||
| env: | ||
| RUN_JEPSEN: 'true' | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: '21' | ||
| - name: Install Leiningen | ||
| run: | | ||
| curl -L https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > ~/lein | ||
| chmod +x ~/lein | ||
| ~/lein version | ||
| - name: Run Jepsen tests | ||
| if: env.RUN_JEPSEN == 'true' | ||
| working-directory: jepsen | ||
| run: ~/lein test |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 5 months ago
To fix the issue, add a permissions block specifying the minimum required permissions for the workflow. The best practice is to set contents: read at either the workflow root or per-job basis. For this workflow, since the job does not require write permissions (no deployment, repository pushing, etc.), we can safely set contents: read at the workflow root. This will limit the GITHUB_TOKEN permissions for all jobs that do not declare their own overrides. Edit .github/workflows/jepsen-test.yml by inserting the following after the name: block and before jobs: on line 7:
permissions:
contents: readThis ensures the workflow runs with the principle of least privilege.
-
Copy modified lines R7-R8
| @@ -4,6 +4,8 @@ | ||
| group: ${{ github.workflow }}-${{ github.ref }}-jepsen-test | ||
|
|
||
| name: Jepsen Test | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
https://github.com/bootjp/elastickv/blob/e7c0ac78eb9b1420dde6328752ca570792c4868e/jepsen/src/elastickv/jepsen_test.clj#L39-L38
[P1] Use valid Redis port in Jepsen client
The Jepsen test constructs its Redis client with ->RedisClient 63791, which means open! will instantiate Jedis on port 63791. Port numbers must be in the 0–65535 range, so this throws java.lang.IllegalArgumentException: port out of range before the test ever runs. As a result the workflow always crashes when the Jepsen suite is executed. This should use a valid port (e.g., 6379) or a configurable value.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
Summary
RUN_JEPSENtotrueTesting
go test ./...RUN_JEPSEN=true ~/lein testhttps://chatgpt.com/codex/tasks/task_e_68b087e80e74832498e0c726ca1beef5